package main

import (
	"fmt"
	"math"
	"strings"
)

/*
Use as:
  BinaryFormat(30)
*/
func BinaryFormat(s int) string {
	a := uint32(s)
	sb := strings.Builder{}
	c := uint32(math.Pow(2, 31))
	for i := 0; i < 32; i++ {
		if a&c > 0 {
			sb.WriteString("1")
		} else {
			sb.WriteString("0")
		}
		c = c >> 1
	}
	return sb.String()
}

func main() {
	fmt.Printf(BinaryFormat(9999))
}
